{extend name="base" /}
{block name="body"}
<div class="admin-main">
<div class="layui-field-box layui-form">
				<a href="{:url('admin/link/add')}" class="layui-btn layui-btn-small" id="add">
					<i class="layui-icon">&#xe608;</i> 添加链接
				</a>
				<table class="layui-table admin-table">
       
                    <thead>
                    <tr>
                        <th style="width: 30px;">ID</th>
                        <th style="width: 30px;">排序</th>
                        <th>名称</th>
                        <th>链接</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    {foreach name="link_list" item="vo"}
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.sort}</td>
                        <td>{$vo.name}</td>
                        <td>{$vo.link}</td>
                        <td>{php}echo $vo['status'] ? '显示' : '隐藏';{/php}</td>
                        <td>
                            <a href="{:url('admin/link/edit',['id'=>$vo['id']])}" class="layui-btn layui-btn-normal layui-btn-mini">编辑</a>
                            <a href="javascript:;" data-id="{$vo.id}" data-url="{:url('admin/link/delete',['id'=>$vo['id']])}" class="elementdel layui-btn layui-btn-danger layui-btn-mini ajax-delete">删除</a>
                        </td>
                    </tr>
                    {/foreach}
                    </tbody>
                  </table>
	</div>
		
			
		</div>				
{/block}
 {block name="page"}
<div class="btable-paged" >
<div class="layui-main">
	{$link_list->render()}
</div>
</div>
 {/block}
     {block name="js"}
<script type="text/javascript" src="__ADMIN__/js/delelement.js"></script>
 {/block}